﻿Public Class frmCourses      ' Created by Wesley Boyd

    Private Sub COURSESBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles COURSESBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.COURSESBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.CoursesDataSet)

    End Sub

    Private Sub frmCourses_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'CoursesDataSet.COURSES' table. You can move, or remove it, as needed.
        'Me.COURSESTableAdapter.Fill(Me.CoursesDataSet.COURSES)

    End Sub

    Private Sub Search_By_IDToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Search_By_IDToolStripButton.Click
        Try
            Me.COURSESTableAdapter.Search_By_ID(Me.CoursesDataSet.COURSES, IDToolStripTextBox.Text)
        Catch ex As System.Exception
            System.Windows.Forms.MessageBox.Show(ex.Message)
        End Try

    End Sub

    Private Sub Search_By_NameToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Search_By_NameToolStripButton.Click
        Try
            Me.COURSESTableAdapter.Search_By_Name(Me.CoursesDataSet.COURSES, NameToolStripTextBox.Text)
        Catch ex As System.Exception
            System.Windows.Forms.MessageBox.Show(ex.Message)
        End Try

    End Sub
End Class